package cn.youfule.dp.factory.abstractFactory;

public class Test {

	public static void main(String[] args) {
/*		Car c = new Car();
		c.run();
		
		AK47 ak = new AK47();
		ak.shoot();
		
		Apple a = new Apple();
		a.printName();*/
		
		AbstractFactory f = new DefaultFactory();
		Vehicle v = f.createVehicle();
		v.run();
		
		Weapon w = f.createWeapon();
		w.shoot();
		
		Food ff = f.createFood();
		ff.printName();
		

	}
}
